home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / prolog / brklyprl.lha / Emulator / Instructions / make_skels < prev    next >
Encoding:
Text File  |  1989-04-14  |  540 b   |  20 lines

  1. #! /bin/csh -f
  2. rm -f instructions.h; touch instructions.h
  3. foreach i (`cat files`)
  4.     set i = `echo $i | sed 's/\./ /g'`
  5.     set filename = $i[1].h
  6.     set name = '"'$i[1]'"'
  7.     set id = `echo $i[1] | upcase`
  8.     set fn = `echo $i[1] | chcase`
  9.     foreach j (1 2 3)
  10.         @ k = $j + 1
  11.         set a$j = ARG_`echo $i[$k] | upcase`
  12.     end
  13.     echo "#ifdef NAMES" >! $filename
  14.     echo "use($name,$id,$fn,$a1,$a2,$a3)" >> $filename
  15.     echo "#endif" >> $filename
  16.     echo '#include "Instructions/'$filename'"' >> instructions.h
  17.     echo $name done
  18. end
  19. mv instructions.h ..
  20. #upcase chcase